package com.wyc.service;

import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.beans.factory.annotation.Value;
import org.springframework.stereotype.Service;

import java.io.UnsupportedEncodingException;
import java.util.Map;

/**
 *  云监控类
 * */
@Service
public class PlantfromService {

    @Value("${platfrom.com_test}")
    String com;
    @Value("${platfrom.searchGroupList}")
    String searchGroupList;
    @Value("${platfrom.searchGroupCatalogList}")
    String searchGroupCatalogList;
    @Value("${platfrom.searchGroupResourceList}")
    String searchGroupResourceList;
    @Value("${platfrom.searchGroupResourceInfo}")
    String searchGroupResourceInfo;
    @Value("${platfrom.searchGroupForResourceList}")
    String searchGroupForResourceList;
    @Value("${platfrom.directoryCount}")
    String directoryCount;
    @Value("${platfrom.groupList}")
    String groupList;
    @Value("${platfrom.dataList}")
    String dataList;
    @Value("${platfrom.shareDataCount}")
    String shareDataCount;
    @Value("${platfrom.shareDataGroupList}")
    String shareDataGroupList;
    @Value("${platfrom.groupUseShareDataSetList}")
    String groupUseShareDataSetList;
    @Value("${platfrom.groupShareDataDescribe}")
    String groupShareDataDescribe;
    @Autowired
    HttpClient httpClient;

    public String getList(String url, Map map) {
        String result = null;
        try {
            result = httpClient.getclient(url,map);
        } catch (UnsupportedEncodingException e) {
            e.printStackTrace();
        }
        return  result;
    }

    //post方式查询数据的接口
    public String postList(String params, String url,Map map) {
        return httpClient.postclient(url,params,map);
    }
}
